package com.smartwebx.fr.controller;

import java.io.IOException;
import java.net.URL;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.google.common.io.BaseEncoding;
import com.google.common.io.Resources;

/**
 * 等值线
 * 
 * @author zhangxi
 * 
 */
@Controller
@RequestMapping("/isoLine")
public class IsoLineController {

	/**
	 * 获得等值线
	 * 
	 * @param beginTm
	 * @param endTm
	 * @param waterArea
	 *            区域
	 * @param waterType
	 *            类型
	 * @throws IOException
	 */
	@RequestMapping("/getLine")
	@ResponseBody
	public String savePageTitle(String beginTm, String endTm,
			String waterArea, String waterType) throws IOException {
		URL fileUrl = Resources.getResource("Google.png");
		byte[] data = Resources.toByteArray(fileUrl);
		return BaseEncoding.base64().encode(data);
	}
}
